package com.hxtec.polaris.mapper;

import com.hxtec.polaris.entity.ShopCarouse;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.MyMapper;

import java.util.List;
import java.util.Map;

/**
 * @Author yonyong
 * @Description //TODO
 * @Date 2019/11/14 11:04
 * @Param
 * @return
 **/
public interface ShopCarouseMapper extends MyMapper<ShopCarouse> {

    List<ShopCarouse> getAll();

    /**
     * 执行更新轮播图
     * @param shopCarouse
     */
    void doUpdateCarouse(ShopCarouse shopCarouse);

    /**
     * 执行添加轮播图
     * @param shopCarouse
     */
    void doAddCarouse(ShopCarouse shopCarouse);
    /**
     * 执行删除轮播图
     * @param id
     */
    void doDeleteCarouse(int id);

    /**
     * 分页获取数据 总数
     * @param pageNow
     * @param rows
     * @param condition
     * @param isDeleted
     * @return
     */
    int doGetListCount(@Param("pageNow")Integer pageNow, @Param("rows")Integer rows, @Param("condition")String condition, @Param("isDeleted")String isDeleted);

    /**
     * 分页获取数据
     * @param start
     * @param rows
     * @param condition
     * @param isDeleted
     * @return
     */
    List<Map<String,Object>> doGetList(@Param("start")int start, @Param("rows")Integer rows,@Param("condition") String condition, @Param("isDeleted")String isDeleted);

    /**
     * 上下架管理
     * @param id
     * @param isDeleted
     */
    void doUpDown(@Param("id") int id,@Param("isDeleted")  String isDeleted);
}